include make.inc
#OOPS_HOME = /home/s0965328/research/oops
#METIS_HOME = /home/s0965328/research/metis-4.0.3
#AMPLSOLVER = /home/s0965328/research/ampl-interface/sys.x86_64.Linux
#SML_HOME = /home/s0965328/research/sml/trunk

CFLAGS = -g 
CXXFLAGS = -I$(SML_HOME)/src -I$(AMPLSOLVER) -I$(OOPS_HOME)/include -gstabs
CXX = mpic++
LDFLAGS += -g -O2 -L$(SML_HOME)/lib -lsml -L$(OOPS_HOME)/lib -loops -llapack -L$(METIS_HOME) -lmetis $(AMPLSOLVER)/amplsolver.a -lgfortran -lfl -ldl

OBJECT := sml-oops.o wrapper.o OOPSBlock.o
 
all: smloops

%.o : %.cpp
	$(CXX) $(CXXFLAGS) -c -o $(OBJ_DIR)/$@ $<

smloops: $(OBJECT)
	$(CXX) -o $@ $(addprefix $(OBJ_DIR)/,$^) $(LDFLAGS)


clean:
	-rm -rf $(OBJ_DIR)/*.o
	-rm -rf smloops
	